<uieip type="page" value="base"></uieip>
<!DOCTYPE html>
<html lang="zh">

<head>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  <title>基础折线图</title>
  <uieip type="file" value="inc" src="/yqwin/easyui/include.txt" cache="true" minute="1440"></uieip>
  <uieip type="file" value="css" src="/yqwin/css/yqwin.min" cache="false"></uieip>
  <uieip type="file" value="js" src="/yqwin/data/yqwin.min" cache="false"></uieip>
  <script type="text/javascript" src="/scripts/echarts/echarts.min.js"></script>
</head>

<body>
  <a href="javascript:window.history.back();">返回</a>
  <table style="margin-top: 10px;">
    <tr>
      <td>
        <div id="div_container" style="width:800px;height:600px;padding:0px;border:1px solid rgb(239, 239, 239);">
        </div>
      </td>
      <td>
        <div id="div_editor" style="width:450px;height:600px;"></div>
      </td>
    </tr>
  </table>
  <script type="text/javascript">
    var option = {
      xAxis: {
        type: 'category',
        data: ['周一', '周二', '周三', '周四', '周五', '周六', '周日']
      },
      yAxis: {
        type: 'value'
      },
      series: [
        {
          data: [150, 230, 224, 218, 135, 147, 260],
          type: 'line'
        }
      ]
    };

    var myChart;
    var app = {};
    $(function () {
      var dom = document.getElementById('div_container');
      myChart = echarts.init(dom, null, {
        renderer: 'canvas',
        useDirtyRect: false
      });

      myChart.setOption(option);

      init_editor();
    });

    function init_editor() {
      $("#div_editor").yqCodeEdit({
        types: ["json"],
        type: "json",
        value: JSON.stringify(option, null, 2)
      });
    }
  </script>
</body>

</html>